import service from '@/utils/request'

// @Tags ParkingSpace
// @Summary 创建parkingSpace表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ParkingSpace true "创建parkingSpace表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /parkingSpaces/createParkingSpace [post]
export const createParkingSpace = (data) => {
  return service({
    url: '/parkingSpaces/createParkingSpace',
    method: 'post',
    data
  })
}

// @Tags ParkingSpace
// @Summary 删除parkingSpace表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ParkingSpace true "删除parkingSpace表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /parkingSpaces/deleteParkingSpace [delete]
export const deleteParkingSpace = (data) => {
  return service({
    url: '/parkingSpaces/deleteParkingSpace',
    method: 'delete',
    data
  })
}

// @Tags ParkingSpace
// @Summary 批量删除parkingSpace表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除parkingSpace表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /parkingSpaces/deleteParkingSpace [delete]
export const deleteParkingSpaceByIds = (data) => {
  return service({
    url: '/parkingSpaces/deleteParkingSpaceByIds',
    method: 'delete',
    data
  })
}

// @Tags ParkingSpace
// @Summary 更新parkingSpace表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ParkingSpace true "更新parkingSpace表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /parkingSpaces/updateParkingSpace [put]
export const updateParkingSpace = (data) => {
  return service({
    url: '/parkingSpaces/updateParkingSpace',
    method: 'put',
    data
  })
}

// @Tags ParkingSpace
// @Summary 用id查询parkingSpace表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.ParkingSpace true "用id查询parkingSpace表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /parkingSpaces/findParkingSpace [get]
export const findParkingSpace = (params) => {
  return service({
    url: '/parkingSpaces/findParkingSpace',
    method: 'get',
    params
  })
}

// @Tags ParkingSpace
// @Summary 分页获取parkingSpace表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取parkingSpace表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /parkingSpaces/getParkingSpaceList [get]
export const getParkingSpaceList = (params) => {
  return service({
    url: '/parkingSpaces/getParkingSpaceList',
    method: 'get',
    params
  })
}

// zzz  获取车库信息接口
export const getGarageList = () => {
  return service({
    url: '/garage/getGarageList',
    method: 'get',
  })
}

export const getParkingSpaceListNoPage = (params) => {
  return service({
    url: '/parkingSpaces/getParkingSpaceListNoPage',
    method: 'get',
    params
  })
}

